package com.dempsey.springboot06security.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Dempsey
 * Date 2022/2/8
 * Description
 */

@Controller
public class RouterController {

    @RequestMapping({"/", "/index"})
    public String index() {
        return "index";
    }

    @RequestMapping("/toLogin")
    public String toLogin() {
        return "views/login";
    }

    @RequestMapping("/level/{levelId}/{pathId}")
    public String level(@PathVariable("levelId") Integer levelId,
                        @PathVariable("pathId") Integer pathId) {
        return "views/level" + levelId + "/" + pathId;
    }


}
